package day2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Triangle {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int h=0;
        while (true){
            System.out.println("请输入高度：");
            h=in.nextInt();
            if(h>0){
                break;
            }
            System.out.println("输入错误！");
        }
        for (int i = 1; i <= h; i++) {
            for (int j = 1; j <=i ; j++) {
                System.out.print("# ");
            }
            System.out.println();
        }
    }
}
